from django.shortcuts import render
from blogs.models import BlogPost
import logging

logger = logging.getLogger(__name__)
# Create your views here.

def defaultMethod(request):
    posts = BlogPost.objects.all()
    context = {"posts" : posts}
    logger.info(" 返回全部博客。")
    return render(request,"blogs/index.html",context)

def blog(request):
    pass
    